import { reqGoodsDetail } from '@/api/goodsDetail'

const state = {
  goodsDetail: {}
}
const mutations = {
  saveGoodsDetail(state, goodsDetail) {
    state.goodsDetail = goodsDetail
  }
}
const actions = {
  async getGoodsDetail(context, id) {
    const res = await reqGoodsDetail(id)
    // console.log(res)
    if (res.code === 200) {
      console.log(res)
    }
  }
}
export default {
  namespaced: true,
  state,
  mutations,
  actions
}
